<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>已完成目标</title>
    <!-- 引入 echarts.js -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all">
    <script src="../../js/jquery3.js"></script>
</head>
<style type="text/css">
	body{
		overflow-y: hidden;
	}
    #dv {
        background-color: white;
        width: 96%;
        margin: 20px 20px auto;
    }
</style>
<script src="../../layui/layui.js"></script>
<body bgcolor="whitesmoke">

<div id="dv">
    </br>
    &nbsp;&nbsp;&nbsp;&nbsp;<i class="layui-icon layui-icon-ok" style="width: 150px;height: 100px;"><b>已完成目标</b></i>
    </br></br>
    <table class="layui-hide" id="test" lay-filter="test"></table>
</div>

<script>
    $.post("/user/getSelf", {}, function (data) {
        if (data != null) {
        layui.use('table', function () {
        var table = layui.table;

        table.render({
            elem: '#test',
            url: '/target/findArchived',
            method:'post',
            page: {
                limits: [5, 10, 15, 20],
                limit: 5,
                theme: '#5FB878',
            },
            where:{
                uid:data.u_id
            },

            defaultToolbar: ['filter', 'exports'],
            title: '我的任务',
            cellMinWidth: 100 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            ,
            cols: [
                [
                    {
                        title: '序号',
                        type:"numbers",
                    },
                    {
                        field: 't_id',
                        title: 'id',
                        fixed: 'left',
                        hide:true
                    }, {
                    title: '目标日期',
                    templet: function (result) {

                        return result.t_begin_date + "-" + result.t_end_date;
                    }
                }, {
                    field: 't_status',
                    title: '目标状态'
                },
                    {
                        field: 't_describe',
                        title: '目标描述'
                    },
                    {
                        field: 't_creat_date',
                        title: '创建时间'
                    },
                    {
                        field: 't_creator',
                        title: '创建人'
                    }]
            ]

        });


    });
        } else {
            alert("未登录，请先登录")
            location.href = "../login/login.html"
        }
    })
</script>


<script type="text/javascript">
    $(function () {
        //获取百分比值
        var value = parseInt($('.text').html());

        //当百分比小于等于50
        if (value <= 50) {
            var html = '';

            html += '<div class="mask-right" style="transform:rotate(' + (value * 3.6) + 'deg)"></div>';

            //元素里添加子元素
            $('.circle-right').append(html);
        } else {
            value -= 50;
            var html = '';

            html += '<div class="circle-left">';
            html += '<div class="mask-left" style="transform:rotate(' + (value * 3.6) + 'deg)"></div>';
            html += '</div>';

            //元素后添加元素
            $('.circle-right').after(html);
        }
    })
</script>


</body>


</html>
